<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/area","dataName":"areaData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="areaData" data-tplid="list-tpl">
        <thead>
            <tr>
                <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                      lay-skin="primary"></th>
                <th>ID</th>
                <th>名称</th>
                <th>状态</th>
                <th width="150">排序
                    <div class="order-box">
                    <a href="javascript:;" class="sort" data-filed="id" data-asc="true"><i class="iconfont" >&#xe615;</i></a>
                    <a href="javascript:;" class="sort down" data-filed="id"><i class="iconfont">&#xe647;</i></a>
                    </div>
                </th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {{# layui.each(d.list, function(index, item){ }}
            <tr>
                <td><input type="checkbox" name="checkbox" value="{{ item.id}}" lay-skin="primary"></td>

                <td data-list='{"key":"ids={{ item.id}}","filed":"id","render":"true"}'
                    data-params='{"url":"/education/admin/area/update/{{ item.id}}"}'>
                    {{item.id}}
                </td>
                <td>
                    {{strRepeat('&nbsp;&nbsp;&nbsp;&nbsp;', getLevel(item.path))}}
                    {{# if(getLevel(item.path)>0){ }} ├&nbsp; {{# } }}
                    {{ item.name}}
                </td>
                <td data-list='{"key":"ids={{ item.id}}","filed":"status","render":"true"}'
                    data-params='{"url":"/education/admin/area/update/{{ item.id}}"}'>
                    {{item.status == 1 ? '启用' : '禁用' }}
                </td>
                <td><input type="text" class="layui-input ajax-blur" name="ord"
                           value="{{ item.ord || '' }}"
                           data-params='{"url":"/education/admin/area/updateOptional/{{ item.id}}"}'> </td>
                <td>

                    <button class="layui-btn layui-btn-mini" onclick="_edit('{{item.id}}');">
                        <i class="iconfont">&#xe653;</i>编辑
                    </button>
                    <button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                            data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/area/delete","data":"checkbox={{ item.id}}", "method":"post", "confirm":"true"}'>
                        <i class="iconfont">&#xe626;</i>删除
                    </button></td>
                </td>
            </tr>
            {{# }); }}
        </tbody>

    </table>
</script>